package uz.gov.test;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import uz.gov.pages.CartWindow;
import uz.gov.pages.CheckoutPage;
import uz.gov.pages.HomePage;
import uz.gov.pages.ResultPage;

/**
 * Created by IIGalytska on 07.04.14.
 */
public class RezetkaOrderInvalidClientNegative extends PrePostConditions{
    @DataProvider(name = "test5")
    public Object[][] provideData() {

        return new Object[][] {
                { "", "0979999999", "angelina_goli41@ukr.net"  },
                /**
                 { 2 , "http://rozetka.com.ua/phones-mp3-gps/c80257/"},
                 { 3 , "http://rozetka.com.ua/tv-photo-video/c80258/"},
                 **/
        };
    }

    @Test(dataProvider = "test5")

    public void testOrder(String param1, String param2, String param3){

        //start from home page
        HomePage home = new HomePage(driver);
        //navigate to product search result page
        ResultPage result = home.search("ipad");
        //press bey! button for the first link
        CartWindow cart = result.pressBuyForFirstLink();
        //press checkout button

        CheckoutPage checkout  = cart.pressCheckoutButton();



        Assert.assertTrue(checkout.fillInDataNegative(param1, param2, param3).contains("background-color: rgb(255"));

    }



}
